/*
 * Copyright 2010 - 2011, The PLDesktop Development Team
 *
 *  This library is free software; you can redistribute it and/or
 *  modify it under the terms of the GNU Lesser General Public
 *  License as published by the Free Software Foundation; either
 *  version 2.1 of the License, or (at your option) any later version.
 *
 *  This library is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 *  Lesser General Public License for more details.
 *
 *  You should have received a copy of the GNU Lesser General Public
 *  License along with this library; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *
 */

#ifndef PLJAVA_CONST_TYPES_UTF8_H
#define PLJAVA_CONST_TYPES_UTF8_H

#include <PLJavaFile.h>

namespace PLSDK {

/**
 * Class represent a Utf8 value in the const table.
 */
class PLJavaConstTypesUtf8 : public PLJavaConst {
public:
    /**
     * Constructor.
     *
     * @param str The string data.
     * @param len The length of the string.
     * @todo Implement a Utf8 string.
     */
    PLJavaConstTypesUtf8(const char *str, u2 len);
    /**
     * Get the string data.
     *
     * @return The string.
     */
    inline const char *string() const;
    /**
     * Get the length of the string.
     *
     * @return The length;
     */
    inline u2 length();
private:
    const char *m_string;
    u2 m_length;
};

const char *PLJavaConstTypesUtf8::string() const {
    return m_string;
}

u2 PLJavaConstTypesUtf8::length() {
    return m_length;
}

}

#endif
